﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using LLFM.CAT.Model;
using Common;
using LLFM.CAT.Service;

public partial class Admin_Product_ModifySeries : AdminPage
{
    public string name;
    public string workWeight;
    public string shortDescription;
    public string description;
    public string advantage;
    public int seriesId;
    public List<M_SeriesImages> imags = new List<M_SeriesImages>();
    protected void Page_Load(object sender, EventArgs e)
    {
        seriesId = RequestHelper.GetInt("seriesId", 0);
        bool objNotNull = false;
        if (seriesId > 0)
        {
            M_Series series = SeriesService.GetSeriesById(seriesId);
            if (series != null)
            {
                objNotNull = true;
                name = series.Name;
                workWeight = series.Weight;
                shortDescription = series.ShortDescription;
                description = series.Description;
                advantage = series.Advantage;
                imags = SeriesImagesService.GetSeriesImagesList(seriesId, 1);
            }


        }
        if (!objNotNull)
        {
            Response.Redirect("SeriesList.aspx");
        }
    }
}